Builtin Operations

Operations

AddArray
Description:
Adds a new element to an array.

Parameters:
array - Array: The array to add the new element to.
element - Type of elements stored in the array: The new element to add to the array.

Returns:
If the new element has been successfully added to the given array.
AddAttribute
Description:
Adds a new attribute to an entity.

Parameters:
container - Entity: The entity to add the new attribute to.
entityToAdd - Entity: The new attribute to add to the entity.

Returns:
The entity that contains the new attribute.
CallExternal
Description:
Makes an external call.

Parameters:
id - String: The ID of the external call that has been registered.

Returns:
The response of the call as a String or null if ID doesn't exist.
Contains
Description:
Checks if an element is in an array.

Parameters:
array - Array: The array to check in.
element - Type of elements stored in the array: The element to check for.

Returns:
If the given element is in the array.
Count
Description:
Counts the elements of an array.

Parameters:
array - Array: The array to count.

Returns:
The number of elements of the given array.
CreateDynamicEntity
Description:
Creates a new dynamic entity.

Parameters:
meta - Entity: The meta entity of the new dynamic entity.

Returns:
The new dynamic entity.
CreateEntity
Description:
Creates a new entity.

Parameters:
id - String: The ID of the new entity or null to generate a new one.
meta - Entity: The meta entity of the new entity.

Returns:
The new entity.
DeleteEntity
Description:
Deletes an existing entity.

Parameters:
entity - Entity: The entity to delete.

Returns:
If the entity was found and deleted.
DmlaBuiltinExpressionNode
No DMLA documentation
GenerateId
Description:
Generates a unique id.

Parameters:
prefix - String: The prefix of the id.

Returns:
The generated unique id.
GetAttributes
Description:
Gets the attributes of an entity.

Parameters:
entity - Entity: The entity to get the attributes of.

Returns:
The array of attributes of the given entity.
GetContainerEntities
Description:
Gets the entities that contains an entity as attribute.

Parameters:
entity - Entity: The entity to check the containment of.

Returns:
The array of entities that contain the given entity as attribute.
GetEntityByID
Description:
Gets an entity by its ID.

Parameters:
id - String: The ID of the entity.

Returns:
The entity with the given ID.
GetID
Description:
Gets the ID of a an entity.

Parameters:
entity - Entity: The entity to get the ID of.

Returns:
The ID of the given entity.
GetInstances
Description:
Gets the instances of a an entity. If the entity is null it returns all entities.

Parameters:
entity - Entity: The entity to get the instances of. Optional, default value is null.
isTransitive - Boolean: To get the transitive instances too. Optional, default value is true.

Returns:
The array of instances of the given entity.
GetLocalID
Description:
Gets the last part of the ID of an entity.

Parameters:
entity - Entity: The entity to get the local ID of.

Returns:
The local ID of the given entity.
GetMeta
Description:
Gets the meta entity of an entity.

Parameters:
entity - Entity: The entity to get the meta of.

Returns:
The meta entity of the given entity.
GetValue
Description:
Gets the Value of an entity.

Parameters:
id or entity - String or Entity: The id of the entity or the entity to get the Value of.

Returns:
The Value of the entity with the given id if it exists, otherwise null.
GetValues
Description:
Gets the Values of an entity.

Parameters:
id or entity - String or Entity: The id of the entity or the entity to get the Values of.

Returns:
The Values of the entity with the given id if it exists, otherwise null.
InsertAt
Description:
Adds a new element to an array at a given index.

Parameters:
array - Array: The array to add the new element to.
element - Type of elements stored in the array: The new element to add to the array.
index - Number: The index to add the new element at to the array.

Returns:
Nothing.
IsInstanceOf
Description:
Determines if an entity is the instance of a meta entity.

Parameters:
entity - Entity: The entity to check the meta entity against.
meta - Entity: The meta entity to check against.

Returns:
If the given entity is the instance of the given meta entity.
Print
Description:
Prints a message to the standard output.

Parameters:
message - Object: The message to print.
color - String: The name or hex code of the message color starting with #. Optional, default value is green.

Returns:
Nothing.
PrintLn
Description:
Prints a line of message to the standard output.

Parameters:
message - Object: The message to print. Optional, default value is empty string.
color - String: The name or hex code of the message color starting with #. Optional, default value is green.

Returns:
Nothing.
Remove
Description:
Removes an element from an array.

Parameters:
array - Array: The array to remove the element from.
element - Type of elements stored in the array: The element to remove from the array.

Returns:
If the element was found and removed.
RemoveAt
Description:
Removes an element from an array at a given index.

Parameters:
array - Array: The array to remove the element from.
index - Number: The index to remove the element at from the array.

Returns:
The element that was removed from the given array.
RemoveAttribute
Description:
Removes an existing attribute from an entity.

Parameters:
container - Entity: The entity to remove the attribute from.
entityToRemove - Entity: The attribute to remove from the entity.

Returns:
The container of the removed entity.
SetValue
Description:
Sets the Value of an entity.

Parameters:
id or entity - String or Entity: The id of the entity or the entity to set the Value of.
value - Object: The value to write into the Value of the entity.

Returns:
The Value of the entity with the given id if it exists, otherwise null.
SetValues
Description:
Sets the Values of an entity.

Parameters:
id or entity - String or Entity: The id of the entity or the entity to get the Values of.
values - Array: The values to write into the Values of the entity.

Returns:
The Values of the entity with the given id if it exists, otherwise null.
StrEndsWith
Description:
Determines if a string ends with an another string.

Parameters:
findIn - String: The string to check the end of.
toFind - String: The string to check at the end.
ignoreCase - Boolean: To ignore case. Optional, default value is false.

Returns:
If the given String is at the end.
StrFind
Description:
Determines the start index of a string in another string.

Parameters:
findIn - String: The string to check in.
toFind - String: The string to check.
startIndex - Number: The index to start the check from. Optional, default value is 0.
ignoreCase - Boolean: To ignore case. Optional, default value is false.

Returns:
The start index of the given string or -1 if not found.
StrLen
Description:
Determines the length of a string.

Parameters:
input - String: The string to check the length of.

Returns:
The length of the given string.
StrLower
Description:
Transforms a string to lowercase.

Parameters:
input - String: The string to transform to lowercase.

Returns:
The given string as lowercase.
StrReplace
Description:
Replaces a string in an another string to a new string.

Parameters:
input - String: The string to replace in.
toReplace - String: The string to replace.
replaceWith - String: The string to replace with.
ignoreCase - Boolean: To ignore case. Optional, default value is false.

Returns:
The new string with the replaced string.
StrStartsWith
Description:
Determines if a string starts with another string.

Parameters:
findIn - String: The string to check the start of.
toFind - String: The string to check at the start.
startIndex - Number: The index to start the check from. Optional, default value is 0.
ignoreCase - Boolean: To ignore case. Optional, default value is false.

Returns:
If the given string is at the start.
StrUpper
Description:
Transforms a string to uppercase.

Parameters:
input - String: The string to transform to uppercase.

Returns:
The given string as uppercase.
Substring
Description:
Determines the substring of a string from a start index until an end index. If the end index is -1 it means until the end.

Parameters:
input - String: The string to get the substring of.
startIndex - Number: The start index of the substring.
endIndex - Number: The end index of the substring. Optional, default value is -1.

Returns:
The substring from the given start index until the given end index.